package com.riaya.feign;

import com.riaya.entity.Detail;
import com.riaya.entity.Sort;
import com.riaya.model.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @Author: KAIyo
 * @Date: 2025/7/24 15:03
 * @Version: v1.0.0
 * @Description: TODO
 **/
@FeignClient(name = "shop-server")
@Service
public interface GoodService {

    @GetMapping("/list")
    R getGoodsList(@RequestParam(value = "sortId", required = false) Integer sortId);

    @PostMapping("/drop")
    R dropGoods(Detail detail);

    @GetMapping("/sortlist")
    R getSortList(Integer sortId);

    @GetMapping("/getsortlist")
    public List<Sort> getList();
}
